
package com.insigma.business.qrcode.soldier.service.impl;


import com.insigma.business.qrcode.common.service.SequenceGenerator;
import com.insigma.business.qrcode.soldier.dao.SoldierRegistrationHistoryDao;
import com.insigma.business.qrcode.soldier.dto.SequenceNameConstant;
import com.insigma.business.qrcode.soldier.dto.SoldierRegistrationHistoryBSearcher;
import com.insigma.business.qrcode.soldier.entity.SoldierRegistrationHistoryDO;
import com.insigma.business.qrcode.soldier.service.SoldierRegistrationHistoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service("soldierRegistrationHistoryService")
public class SoldierRegistrationHistoryServiceImpl implements SoldierRegistrationHistoryService {

    @Autowired(required = false)
    private SoldierRegistrationHistoryDao soldierRegistrationHistoryDao;
    @Autowired(required = false)
    private SequenceGenerator sequenceGenerator;

    
    @Override
    public List<SoldierRegistrationHistoryDO> search(final SoldierRegistrationHistoryBSearcher soldierRegistrationHistoryBSearcher) {
        return soldierRegistrationHistoryDao.search(soldierRegistrationHistoryBSearcher);
    }

    
    @Override
    public SoldierRegistrationHistoryDO get(final String id) {
        return soldierRegistrationHistoryDao.get(id);
    }

    
    @Override
    public Integer insert(final SoldierRegistrationHistoryDO soldierRegistrationHistoryDO) {
        soldierRegistrationHistoryDO.setId(sequenceGenerator.genKey(SequenceNameConstant.SOLDIER_REGISTRATION_HISTORY_ID));
        return soldierRegistrationHistoryDao.insert(soldierRegistrationHistoryDO);
    }

    
    @Override
    public Integer update(final SoldierRegistrationHistoryDO soldierRegistrationHistoryDO) {
        return soldierRegistrationHistoryDao.update(soldierRegistrationHistoryDO);
    }

    
    @Override
    public Integer delete(final String id, final String modifierType, final String modifierId) {
        return soldierRegistrationHistoryDao.delete(id, modifierType, modifierId);
    }

    @Override
    public List<SoldierRegistrationHistoryDO> listByStatus(String idCardNo, String status) {
        return soldierRegistrationHistoryDao.listByStatus(idCardNo, status);
    }

    @Override
    public SoldierRegistrationHistoryDO getByRegistrationIdAndStatus(String registrationId, String status) {
        return soldierRegistrationHistoryDao.getByRegistrationIdAndStatus(registrationId, status);
    }

    @Override
    public List<SoldierRegistrationHistoryDO> listByRegistrationId(String registrationId) {
        return soldierRegistrationHistoryDao.listByRegistrationId(registrationId);
    }

}
